import Vue from 'vue'
import Vuex from 'vuex'
// import Cart from './module/Cart'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo: null,
    price: 0
  },
  mutations: {
    setUserInfo(state, data = {}) {
      if (data) {
        state.userInfo = data
      }
    }
  },
  actions: {

  },
  getters: {
    getUserInfo(state) {
      return state.userInfo
    }
  },
})
